package com.reform.controller.expert;


import com.reform.res.Result;
import com.reform.service.IViewExpertScoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author mortale
 * @since 2021-10-17
 */
@Api(tags = "ViewExpertScoreController")
@RestController
@RequestMapping("/view-expert-score")
public class ViewExpertScoreController {
    @Autowired
    IViewExpertScoreService viewExpertScoreService;

    @ApiOperation(value = "通过batchId获取全部专家的项目信息", notes = "通过batchId获取全部专家的项目信息")
    @GetMapping("/getExpertScoresByBatchId")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "batchId", value = "批次id", paramType = "query", dataTypeClass = String.class, required = true),
    })
    public Result getExpertScoresByBatchId(String batchId, HttpServletRequest request) throws SQLException {
        return viewExpertScoreService.getExpertScoresByBatchId(batchId, request);
    }
}
